/* style.css */

/* ================= 全局样式 ================= */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f6f9;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ================= 头部 ================= */
header {
  width: 100%;
  max-width: 1200px;
  background: #4e73df;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  border-radius: 0 0 10px 10px;
}

header h1 {
  margin: 0;
  font-size: 24px;
}

nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* ================= 容器 ================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 30px auto;
}

/* ================= 按钮 ================= */
button {
  background: #1cc88a;
  border: none;
  padding: 10px 18px;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #17a673;
}

/* ================= 输入框 ================= */
input, textarea {
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  transition: 0.3s;
}

input:focus, textarea:focus {
  border-color: #4e73df;
  outline: none;
}

/* ================= 表格 ================= */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
}

th, td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

th {
  background: #f8f9fc;
}

/* ================= 商品卡片 ================= */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  justify-items: center;
}

.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.product-card h3 {
  margin: 12px 0 5px;
  font-size: 18px;
  color: #333;
}

.product-card p {
  font-size: 14px;
  color: #666;
}

.price {
  font-size: 16px;
  color: #e74a3b;
  font-weight: bold;
  margin: 8px 0;
}
